package main

import "fmt"

func main() {
    // 1. 数组
    var arr [3]int = [3]int{1, 2, 3}
    fmt.Println("数组:", arr)

    // 2. 切片
    slice := []int{4, 5, 6}
    slice = append(slice, 7)
    fmt.Println("切片:", slice)

    // 3. 遍历切片
    for index, value := range slice {
        fmt.Printf("索引: %d, 值: %d\n", index, value)
    }
}